#version 450

layout(location=0) in vec3 a_Pos;
layout(location=1) in vec3 a_Color;

layout(set=0, binding=0, std140) uniform UBO {
    mat4 projMat;
    mat4 viewMat;
    mat4 modelMat;
} ubo;

layout(push_constant) uniform PC {
    vec4 color;
    vec4 postion;
} pc;

layout(location=0) out vec3 v_Color;

void main() {
    vec3 locPos = vec3(ubo.modelMat * vec4(a_Pos, 1.0));
    vec3 worldPos = locPos + pc.postion.xyz;
    gl_Position = ubo.projMat * ubo.viewMat * vec4(worldPos, 1.0);
    v_Color = a_Color * pc.color.rgb;
}